package cn.jdy.plugins.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import cn.jdy.common.bo.BaseEntry;

/**
 * @desc   交流区内容
 * @author ningqian
 * @date  2017-3-23
 */
@Entity
public class Chat extends BaseEntry implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	// 根据数据库自动适配 mysql默认自增
	private long id; // 主键

	private String userOpenId;   //用户唯一标识
	private String userNickName; //昵称
	private String userHeadImg;  //头像
	private String userSex;      //性别
	
	private String chatType;     //内容类别:1-文字，2-图片，3-红包	，4-打赏;
	@Column(columnDefinition = "longtext")
	private String chatContent;  //内容
	private String status;       //状态:0-未审核；1-审核通过；2-审核不通过
	private String checkId;      //审核人，关联管理员表
	private String checkTime;    //审核时间
	
	
	@ManyToOne
	@JoinColumn(name = "liveId", insertable = false, updatable = false)
	//chat表 liveId 外键关联live表的id
	private Live live;
	private Long liveId; //直播id，关联直播表
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public Long getLiveId() {
		return liveId;
	}
	public void setLiveId(Long liveId) {
		this.liveId = liveId;
	}
	public String getUserOpenId() {
		return userOpenId;
	}
	public void setUserOpenId(String userOpenId) {
		this.userOpenId = userOpenId;
	}
	public String getUserNickName() {
		return userNickName;
	}
	public void setUserNickName(String userNickName) {
		this.userNickName = userNickName;
	}
	public String getUserHeadImg() {
		return userHeadImg;
	}
	public void setUserHeadImg(String userHeadImg) {
		this.userHeadImg = userHeadImg;
	}
	public String getUserSex() {
		return userSex;
	}
	public void setUserSex(String userSex) {
		this.userSex = userSex;
	}
	
	public String getChatType() {
		return chatType;
	}
	public void setChatType(String chatType) {
		this.chatType = chatType;
	}
	public String getChatContent() {
		return chatContent;
	}
	public void setChatContent(String chatContent) {
		this.chatContent = chatContent;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getCheckId() {
		return checkId;
	}
	public void setCheckId(String checkId) {
		this.checkId = checkId;
	}
	public String getCheckTime() {
		return checkTime;
	}
	public void setCheckTime(String checkTime) {
		this.checkTime = checkTime;
	}
	public Live getLive() {
		return live;
	}
	public void setLive(Live live) {
		this.live = live;
	}
}